package com.alex.cms.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.alex.cms.domain.CmsArticle;
import com.alex.cms.web.vo.ArticleVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;

/**
 * <p>
 * 文章内容表 Mapper 接口
 * </p>
 *
 * @author alex
 * @since 2019-09-11
 */
public interface CmsArticleMapper extends BaseMapper<CmsArticle> {
	//分页获取所有的文章dao
	public IPage<ArticleVo> selectAllArticlesByUserId(IPage<ArticleVo> page, @Param(Constants.WRAPPER)QueryWrapper<ArticleVo> queryWrapper);
	//获取所有的文章列表
	public List<ArticleVo> selectAllArticlesByUserId(@Param(Constants.WRAPPER)QueryWrapper<ArticleVo> queryWrapper);
	//分页获取点击率排行榜
	public List<CmsArticle> selectAllArticlesByHits(IPage<CmsArticle> page, @Param(Constants.WRAPPER)QueryWrapper<CmsArticle> queryWrapper);
}
